<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>RT-Thread RTOS: finsh shell</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RT-Thread RTOS
   &#160;<span id="projectnumber">1.2.0</span>
   </div>
   <div id="projectbrief">An open source embedded real-time operating system</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__finsh.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">finsh shell</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga3488e933d5632544dc9a916134245af7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga3488e933d5632544dc9a916134245af7">FINSH_ERROR_OK</a>&#160;&#160;&#160;0</td></tr>
<tr class="separator:ga3488e933d5632544dc9a916134245af7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64923347c4fc23842edd636c26d795a6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga64923347c4fc23842edd636c26d795a6">FINSH_ERROR_INVALID_TOKEN</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:ga64923347c4fc23842edd636c26d795a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1770f167ef1582ac09b41d3bed3ad3f3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga1770f167ef1582ac09b41d3bed3ad3f3">FINSH_ERROR_EXPECT_TYPE</a>&#160;&#160;&#160;2</td></tr>
<tr class="separator:ga1770f167ef1582ac09b41d3bed3ad3f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2ddf9ed1d596afb60c2d076dfdb2818"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gac2ddf9ed1d596afb60c2d076dfdb2818">FINSH_ERROR_UNKNOWN_TYPE</a>&#160;&#160;&#160;3</td></tr>
<tr class="separator:gac2ddf9ed1d596afb60c2d076dfdb2818"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa4e83b37a8c73e8cfd10c763444aa7ce"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaa4e83b37a8c73e8cfd10c763444aa7ce">FINSH_ERROR_VARIABLE_EXIST</a>&#160;&#160;&#160;4</td></tr>
<tr class="separator:gaa4e83b37a8c73e8cfd10c763444aa7ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa2b4532fe15f9800b96741a9060795f7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaa2b4532fe15f9800b96741a9060795f7">FINSH_ERROR_EXPECT_OPERATOR</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:gaa2b4532fe15f9800b96741a9060795f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaff9a0273efba0367039731941b1deef7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaff9a0273efba0367039731941b1deef7">FINSH_ERROR_MEMORY_FULL</a>&#160;&#160;&#160;6</td></tr>
<tr class="separator:gaff9a0273efba0367039731941b1deef7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaba62469aa55c69494a5b6773de671ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaaba62469aa55c69494a5b6773de671ad">FINSH_ERROR_UNKNOWN_OP</a>&#160;&#160;&#160;7</td></tr>
<tr class="separator:gaaba62469aa55c69494a5b6773de671ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga76ab95077f21b51fc82c736617c0ba4a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga76ab95077f21b51fc82c736617c0ba4a">FINSH_ERROR_UNKNOWN_NODE</a>&#160;&#160;&#160;8</td></tr>
<tr class="separator:ga76ab95077f21b51fc82c736617c0ba4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac4c47cabbf68dbdf3c17cd8e8a715b5e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gac4c47cabbf68dbdf3c17cd8e8a715b5e">FINSH_ERROR_EXPECT_CHAR</a>&#160;&#160;&#160;9</td></tr>
<tr class="separator:gac4c47cabbf68dbdf3c17cd8e8a715b5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga859aef184195257c8577972e0fe20222"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga859aef184195257c8577972e0fe20222">FINSH_ERROR_UNEXPECT_END</a>&#160;&#160;&#160;10</td></tr>
<tr class="separator:ga859aef184195257c8577972e0fe20222"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae6f47a9204cfea6348f2df1de0c29383"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gae6f47a9204cfea6348f2df1de0c29383">FINSH_ERROR_UNKNOWN_TOKEN</a>&#160;&#160;&#160;11</td></tr>
<tr class="separator:gae6f47a9204cfea6348f2df1de0c29383"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga52a3188969ee71847bddf52ad1e714bf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga52a3188969ee71847bddf52ad1e714bf">FINSH_ERROR_NO_FLOAT</a>&#160;&#160;&#160;12</td></tr>
<tr class="separator:ga52a3188969ee71847bddf52ad1e714bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf19f58eb853fac234bef69752cf791bb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaf19f58eb853fac234bef69752cf791bb">FINSH_ERROR_UNKNOWN_SYMBOL</a>&#160;&#160;&#160;13</td></tr>
<tr class="separator:gaf19f58eb853fac234bef69752cf791bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2f3c0f6a80e2bb99784f136510913c00"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga2f3c0f6a80e2bb99784f136510913c00">FINSH_ERROR_NULL_NODE</a>&#160;&#160;&#160;14</td></tr>
<tr class="separator:ga2f3c0f6a80e2bb99784f136510913c00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga944b96ca55cb370cfe92211c68a55664"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga944b96ca55cb370cfe92211c68a55664">FINSH_FUNCTION_EXPORT</a>(name, desc)&#160;&#160;&#160;FINSH_FUNCTION_EXPORT_CMD(name, name, desc)</td></tr>
<tr class="separator:ga944b96ca55cb370cfe92211c68a55664"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3b995a06148f4155bd274b3b4f893d76"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga3b995a06148f4155bd274b3b4f893d76">FINSH_FUNCTION_EXPORT_ALIAS</a>(name, alias, desc)&#160;&#160;&#160;FINSH_FUNCTION_EXPORT_CMD(name, alias, desc)</td></tr>
<tr class="separator:ga3b995a06148f4155bd274b3b4f893d76"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d756c1e1b9bd44c94a3f97ef62fb02b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga8d756c1e1b9bd44c94a3f97ef62fb02b">MSH_CMD_EXPORT</a>(command, desc)</td></tr>
<tr class="separator:ga8d756c1e1b9bd44c94a3f97ef62fb02b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaed99f2320eea22a0d941d4095e47fdb9"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaed99f2320eea22a0d941d4095e47fdb9">finsh_type</a> { <br/>
&#160;&#160;<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9ade53b28d63e2eb8bf9db1c8c208064bb">finsh_type_unknown</a> = 0, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a8cd81668f94571c0b51d610e1b50938e">finsh_type_void</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a6c6173f41a66c885762085a7565b5782">finsh_type_voidp</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9af9321e231cdf1308dc93f8fcc74cbb47">finsh_type_char</a>, 
<br/>
&#160;&#160;<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9acc8233eadd3a86c9445b6f9ef1eb2409">finsh_type_uchar</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9ad1c003eaf6ae93c7b6822e9645ea64be">finsh_type_charp</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a2e6dab856b6a2c434b0067505e89ffc8">finsh_type_short</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9ad1d657ad220b7809bc1d3f84b49ba308">finsh_type_ushort</a>, 
<br/>
&#160;&#160;<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a2d6a3286098af4a96d29fded58d9c810">finsh_type_shortp</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9aee5c9a462a5a9affc69d8e7bca870251">finsh_type_int</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9abf1c00b19b36e41e1c4d1d7a374e59ae">finsh_type_uint</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a95683e05fd61b3865f160bf59fdd1119">finsh_type_intp</a>, 
<br/>
&#160;&#160;<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a6920dac1e59612b6d0b4d47268459396">finsh_type_long</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a06b40671f2e419fc42f5811f5d60d484">finsh_type_ulong</a>, 
<a class="el" href="group__finsh.html#ggaed99f2320eea22a0d941d4095e47fdb9a3d1432a03da2b3976cd7cdb38a8f35bf">finsh_type_longp</a>
<br/>
 }</td></tr>
<tr class="separator:gaed99f2320eea22a0d941d4095e47fdb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaa7c21ba556e9a84a8cc3a9c18ebeae07"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gaa7c21ba556e9a84a8cc3a9c18ebeae07">finsh_syscall_append</a> (const char *name, syscall_func func)</td></tr>
<tr class="separator:gaa7c21ba556e9a84a8cc3a9c18ebeae07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9e4df71d6d3d4b267063ce941a59ed1b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga9e4df71d6d3d4b267063ce941a59ed1b">finsh_sysvar_append</a> (const char *name, u_char type, void *addr)</td></tr>
<tr class="separator:ga9e4df71d6d3d4b267063ce941a59ed1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4ca70de04431b9f767dff9f2ba7dcc8b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga4ca70de04431b9f767dff9f2ba7dcc8b">finsh_set_device</a> (const char *device_name)</td></tr>
<tr class="separator:ga4ca70de04431b9f767dff9f2ba7dcc8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2e05476dce5ac5afab26e0769292cf83"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga2e05476dce5ac5afab26e0769292cf83">finsh_get_device</a> ()</td></tr>
<tr class="separator:ga2e05476dce5ac5afab26e0769292cf83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae80e3d53913894f5fbfcf9335205c649"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#gae80e3d53913894f5fbfcf9335205c649">finsh_set_echo</a> (<a class="el" href="group___basic_def.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> echo)</td></tr>
<tr class="separator:gae80e3d53913894f5fbfcf9335205c649"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga77d4ddaeaf41942986da9810c6f5b5ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___basic_def.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__finsh.html#ga77d4ddaeaf41942986da9810c6f5b5ee">finsh_get_echo</a> ()</td></tr>
<tr class="separator:ga77d4ddaeaf41942986da9810c6f5b5ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>finsh shell is a user command shell in RT-Thread RTOS, which is a shell can accept C-expression like syntax in command. From finsh shell, user can access system area, such as memory, variables and function by input C-expression in command.</p>
<div class="image">
<img src="finsh.png" alt="finsh.png"/>
<div class="caption">
Figure 3: finsh shell architecture</div></div>
<p>There is a shell thread, which named as "tshell", in the finsh shell, it read user command from console device, and then invokes system function or access system variable to output result (by rt_kprintf). </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga3488e933d5632544dc9a916134245af7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_OK&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>No error </p>

</div>
</div>
<a class="anchor" id="ga64923347c4fc23842edd636c26d795a6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_INVALID_TOKEN&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Invalid token </p>

</div>
</div>
<a class="anchor" id="ga1770f167ef1582ac09b41d3bed3ad3f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_EXPECT_TYPE&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Expect a type </p>

</div>
</div>
<a class="anchor" id="gac2ddf9ed1d596afb60c2d076dfdb2818"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_UNKNOWN_TYPE&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unknown type </p>

</div>
</div>
<a class="anchor" id="gaa4e83b37a8c73e8cfd10c763444aa7ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_VARIABLE_EXIST&#160;&#160;&#160;4</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Variable exist </p>

</div>
</div>
<a class="anchor" id="gaa2b4532fe15f9800b96741a9060795f7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_EXPECT_OPERATOR&#160;&#160;&#160;5</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Expect a operator </p>

</div>
</div>
<a class="anchor" id="gaff9a0273efba0367039731941b1deef7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_MEMORY_FULL&#160;&#160;&#160;6</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Memory full </p>

</div>
</div>
<a class="anchor" id="gaaba62469aa55c69494a5b6773de671ad"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_UNKNOWN_OP&#160;&#160;&#160;7</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unknown operator </p>

</div>
</div>
<a class="anchor" id="ga76ab95077f21b51fc82c736617c0ba4a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_UNKNOWN_NODE&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unknown node </p>

</div>
</div>
<a class="anchor" id="gac4c47cabbf68dbdf3c17cd8e8a715b5e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_EXPECT_CHAR&#160;&#160;&#160;9</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Expect a character </p>

</div>
</div>
<a class="anchor" id="ga859aef184195257c8577972e0fe20222"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_UNEXPECT_END&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unexpect end </p>

</div>
</div>
<a class="anchor" id="gae6f47a9204cfea6348f2df1de0c29383"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_UNKNOWN_TOKEN&#160;&#160;&#160;11</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unknown token </p>

</div>
</div>
<a class="anchor" id="ga52a3188969ee71847bddf52ad1e714bf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_NO_FLOAT&#160;&#160;&#160;12</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Float not supported </p>

</div>
</div>
<a class="anchor" id="gaf19f58eb853fac234bef69752cf791bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_UNKNOWN_SYMBOL&#160;&#160;&#160;13</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unknown symbol </p>

</div>
</div>
<a class="anchor" id="ga2f3c0f6a80e2bb99784f136510913c00"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_ERROR_NULL_NODE&#160;&#160;&#160;14</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Null node </p>

</div>
</div>
<a class="anchor" id="ga944b96ca55cb370cfe92211c68a55664"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_FUNCTION_EXPORT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">desc&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;FINSH_FUNCTION_EXPORT_CMD(name, name, desc)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This macro exports a system function to finsh shell.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the name of function. </td></tr>
    <tr><td class="paramname">desc</td><td>the description of function, which will show in help. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga3b995a06148f4155bd274b3b4f893d76"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FINSH_FUNCTION_EXPORT_ALIAS</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">name, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">alias, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">desc&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;FINSH_FUNCTION_EXPORT_CMD(name, alias, desc)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This macro exports a system function with an alias name to finsh shell.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the name of function. </td></tr>
    <tr><td class="paramname">alias</td><td>the alias name of function. </td></tr>
    <tr><td class="paramname">desc</td><td>the description of function, which will show in help. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga8d756c1e1b9bd44c94a3f97ef62fb02b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MSH_CMD_EXPORT</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">command, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">desc&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This macro exports a command to module shell.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the name of command. </td></tr>
    <tr><td class="paramname">desc</td><td>the description of command, which will show in help. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gaed99f2320eea22a0d941d4095e47fdb9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__finsh.html#gaed99f2320eea22a0d941d4095e47fdb9">finsh_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The basic data type in finsh shell </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9ade53b28d63e2eb8bf9db1c8c208064bb"></a>finsh_type_unknown</em>&nbsp;</td><td class="fielddoc">
<p>unknown data type </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a8cd81668f94571c0b51d610e1b50938e"></a>finsh_type_void</em>&nbsp;</td><td class="fielddoc">
<p>void </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a6c6173f41a66c885762085a7565b5782"></a>finsh_type_voidp</em>&nbsp;</td><td class="fielddoc">
<p>void pointer </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9af9321e231cdf1308dc93f8fcc74cbb47"></a>finsh_type_char</em>&nbsp;</td><td class="fielddoc">
<p>char </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9acc8233eadd3a86c9445b6f9ef1eb2409"></a>finsh_type_uchar</em>&nbsp;</td><td class="fielddoc">
<p>unsigned char </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9ad1c003eaf6ae93c7b6822e9645ea64be"></a>finsh_type_charp</em>&nbsp;</td><td class="fielddoc">
<p>char pointer </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a2e6dab856b6a2c434b0067505e89ffc8"></a>finsh_type_short</em>&nbsp;</td><td class="fielddoc">
<p>short </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9ad1d657ad220b7809bc1d3f84b49ba308"></a>finsh_type_ushort</em>&nbsp;</td><td class="fielddoc">
<p>unsigned short </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a2d6a3286098af4a96d29fded58d9c810"></a>finsh_type_shortp</em>&nbsp;</td><td class="fielddoc">
<p>short pointer </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9aee5c9a462a5a9affc69d8e7bca870251"></a>finsh_type_int</em>&nbsp;</td><td class="fielddoc">
<p>int </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9abf1c00b19b36e41e1c4d1d7a374e59ae"></a>finsh_type_uint</em>&nbsp;</td><td class="fielddoc">
<p>unsigned int </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a95683e05fd61b3865f160bf59fdd1119"></a>finsh_type_intp</em>&nbsp;</td><td class="fielddoc">
<p>int pointer </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a6920dac1e59612b6d0b4d47268459396"></a>finsh_type_long</em>&nbsp;</td><td class="fielddoc">
<p>long </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a06b40671f2e419fc42f5811f5d60d484"></a>finsh_type_ulong</em>&nbsp;</td><td class="fielddoc">
<p>unsigned long </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaed99f2320eea22a0d941d4095e47fdb9a3d1432a03da2b3976cd7cdb38a8f35bf"></a>finsh_type_longp</em>&nbsp;</td><td class="fielddoc">
<p>long pointer </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaa7c21ba556e9a84a8cc3a9c18ebeae07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void finsh_syscall_append </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">syscall_func&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function appends a system call to finsh runtime environment </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the name of system call </td></tr>
    <tr><td class="paramname">func</td><td>the function pointer of system call </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga9e4df71d6d3d4b267063ce941a59ed1b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void finsh_sysvar_append </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u_char&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function appends a system variable to finsh runtime environment </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>the name of system variable </td></tr>
    <tr><td class="paramname">type</td><td>the data type of system variable </td></tr>
    <tr><td class="paramname">addr</td><td>the address of system variable </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4ca70de04431b9f767dff9f2ba7dcc8b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void finsh_set_device </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>device_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the input device of finsh shell.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">device_name</td><td>the name of new input device. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga2e05476dce5ac5afab26e0769292cf83"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* finsh_get_device </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function returns current finsh shell input device.</p>
<dl class="section return"><dt>Returns</dt><dd>the finsh shell input device name is returned. </dd></dl>

</div>
</div>
<a class="anchor" id="gae80e3d53913894f5fbfcf9335205c649"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void finsh_set_echo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___basic_def.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a>&#160;</td>
          <td class="paramname"><em>echo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function set the echo mode of finsh shell.</p>
<p>FINSH_OPTION_ECHO=0x01 is echo mode, other values are none-echo mode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">echo</td><td>the echo mode </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga77d4ddaeaf41942986da9810c6f5b5ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___basic_def.html#ga909edcac80e5e3f93f63fcebc95922c7">rt_uint32_t</a> finsh_get_echo </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function gets the echo mode of finsh shell.</p>
<dl class="section return"><dt>Returns</dt><dd>the echo mode </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Jan 6 2014 23:05:02 for RT-Thread RTOS by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
</body>
</html>
